Part Number Hot Search : 
CT244 2000GXM ML22Q54 IMP38HC4 GS3140 KBPM306G D2145 MAX8643
Product Description
Full Text Search
 

To Download RPC-UHF Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  radiometrix ltd, rpc page 1 radio packet controller ? saw controlled fm transmitter and superhet receiver ? reliable 30 meter in-building range, 120m open ground ? built-in self-test / diagnostics / status led?s ? complies with etsi 300-220 regulations ? single 5v supply @ < 20ma ? 40kbit/s half duplex ? free format packets of 1 - 27 bytes ? packet framing and error checking are user transparent ? collision avoidance (listen before transmit) ? direct interface to 5v cmos logic ? power save mode i ntroduction the rpc is a self-contained plug-on radio port which requires only a simple antenna, 5v supply and a byte-wide i/o port on a host microcontroller (or bi-directional pc port). the module provides all the rf circuits and processor intensive low level packet formatting and packet recovery functions required to inter-connect an number of microcontrollers in a radio network. a data packet of 1 to 27 bytes downloaded by a host microcontroller into the rpc's packet buffer is transmitted by the rpc?s transceiver and will "appear" in the receive buffer of all the rpc's within radio range. a data packet received by the rpc?s transceiver is decoded, stored in a packet buffer and the host microcontroller signalled that a valid packet is waiting to be uploaded. modules: rpc-418-40: ic+bim, uk version rpc-433-40: ic+bim, euro version ic?s: rpc-000-dil: 18 pin dil ic rpc-000-so: 18 pin so ic the rpc-418-40 and rpc-433-40 are intelligent transceiver modules which enable a radio network/link to be simply implemented between a number of digital devices. the module combines a uhf radio transceiver and a 40kbit/s packet controller. the rpc-module figure 1: rpc + host -controller radiometrix issue 4, 25 july 2001 RPC-UHF
radiometrix ltd, rpc page 2
radiometrix ltd, rpc page 3 1. f unctional d escription on receipt of a packet downloaded by the host, the rpc will append to the packet: preamble, start byte and a error check code. the packet is then coded for security and mark:space balance and transmitted through the bim transceiver as a 40kbit/s synchronous stream. one of four methods of collision avoidance (listen before tx) may be user selected. when not in transmit mode, the rpc continuously searches the radio noise for valid preamble. on detection of preamble, the rpc synchronises to the in-coming data stream, decodes the data and validates the check sum. the host is then signalled that a valid packet is waiting to be unloaded. the format of the packet is entirely of the users determination except the 1st byte (the control byte) which must specify the packet type (control or data) and the packet size. a valid received packet is presented back to the host in exactly the same form as it was given. to preserve versatility, the rpc does not generate routing information (i.e. source/ destination addresses) nor does it handshake packets. these network specific functions should be performed by the host. additional features of the rpc include extensive diagnostic/debug functions for evaluation and debugging of the radio and host driver software, a built in self test function and a sleep mode / wake-up mechanism which may be programmed to reduce the average current to less than 100 a. the operating parameters are fully programmable by the host and held in eeprom, the host may also use the eeprom as a general purpose non-volatile store for addresses , routing information etc. 1.1 o perating states the rpc has four normal operating states: ? i dle / sleep ? host transfer ? transmit ? receive i dle /s leep the i dle state is the quiescent/rest state of the rpc. in i dle the rpc enables the receiver and continuously searches the radio noise for message preamble. if the power saving modes have been enabled the rpc will pulse the receiver on, check for preamble and go back to s leep if nothing is found. the 'on' time is 5ms, off time is programmable in the rpc?s eeprom and can vary between 22ms and 2.9s. the tx request line from the host is constantly monitored and will be acted upon if found active (low). a tx request will immediately wake the rpc up from s leep mode. h ost t ransfers if the host sets the tx request line low a data transfer from the host to the rpc will be initiated. similarly the rpc will pull rx request low when it requires to transfer data to the host (this may polled or used to generate a host interrupt ). the transfer protocol is fully asynchronous, i.e. the host may service another interrupt and then continue with the rpc transfer. it is desirable that all transfers are completed quickly since the radio transceiver is disabled until the host <> rpc transfer is completed. typically a fast host can transfer a 27 byte packet to / from the rpc in under 1ms.
radiometrix ltd, rpc page 4 t ransmit on receipt of a data packet from the host, the rpc will append to the packet - preamble, frame sync byte and an error check sum. the packet is then coded for mark:space balance and transmitted. a full 27 byte packet is transmitted in 13.8ms of tx air time (40kb/s + 5ms preamble). collision avoidance (listen before transmit-lbt) functions can be enabled to prevent loss of packets. data packets may be sent with either normal or extended preamble. extended preamble is used if the remote rpc is in power save mode. extended preamble length can be changed in the eeprom memory. r eceive on detection of preamble from the radio receiver, the rpc will phase lock, decode and error check the incoming synchronous data stream and if successful. the data is then placed in a buffer and the rx request line is pulled low to signal to the host that a valid packet awaits to be uploaded to the host. an in-coming data packet is presented back to the host in the same form as it was given.
radiometrix ltd, rpc page 5 2 t he h ost i nterface 2.1 s ignals it is recommended that the rpc be assigned to a byte wide bi-directional i/o port on the host processor. the port must be such that the 4 data lines can be direction controlled without affecting the 4 handshake line. pin pin pin i/o description name number function txr 6 tx request i/p data transfer request from host to rpc txa 7 tx accept o/p data accept handshake back to host rxr 8 rx request o/p data transfer request from rpc to host rxa 9 rx accept i/p data accept handshake back to rpc d0 2 data 0 (4) bi-dir 4 bit bi-directional data bus. tri-state d1 3 data 1 (5) bi-dir between packet transfers, driven on d2 4 data 2 (6) bi-dir receipt for accept signal until packet d3 5 data 3 (7) bi-dir transfer is complete. notes: 1. the 4 handshake lines are active low 2. the 4 data lines true data 3. logic levels are 5v cmos, see electrical specifications 4. input pins have a weak pull-up internally r eset the reset signal, may either be driven by the host (recommended) or pulled up to vcc via a suitable resistor (10k ? ). a reset aborts any transfers in progress and restarts the packet controller. h ost driven reset minimum low time: 1.0 s, after reset is released (returned high). the host should allow a delay 1ms after reset for the rpc to initialise itself during this delay the host must hold txr high (unless d iagnostic m odes are required) and rxr signal should be ignored. figure 5: host to rpc connection
radiometrix ltd, rpc page 6 2.2 h ost t o rpc d ata t ransfer data is transferred between the rpc and the h ost 4 bits (nibbles) at a time using a fully asynchronous protocol. the nibbles are always sent in pairs to form a byte, the least significant nibble (bits 0 to 3) is transferred first, followed by the most significant nibble (bits 4 to 7). two pairs of handshake lines, r equest & a ccept , control the flow of data in each direction:- tx request & tx accept: control the flow from the host to the rpc (download) rx request & rx accept: control the flow from the rpc to the host (upload) a packet transferred between host and rpc consists of between 1 and 28 bytes, the first byte of the packet is always the control byte. there are two classes of h ost ? rpc transfers: 1. data packets: to the transmitter or from the receiver 2. memory access: to or from the rpc's memory figure 6: rpc ? ? ? ? host data transfer
radiometrix ltd, rpc page 7 2.1.1 w rite a b yte t o rpc the sequence for a byte transfer from the host to the rpc (i.e. tx download) is asynchronous and proceeds as follows: 1. host asserts tx request line low to initiate transfer 2. wait for rpc to pull tx accept low (i.e. request is accepted) 3. set data lines to output and place ls nibble on the data lines 4. negate tx request (set to 1) to tell rpc that data is present. 5. wait for rpc to negate tx accept (i.e. data has been accepted) repeat steps 1-5 with ms nibble. notes : ? the data bus must not be set to output until step 3. i.e. after the rpc has accepted the request. the bus may be left as an output until the entire packet has been transferred to the rpc, it should then be set back to input (default state). ? the rpc's normal response time to the initial tx request may be up to 1ms, thereafter, for the duration of the packet, the response will be fast. ? the rpc will ignore a tx request from the host while it is receiving a packet from the radio. if the incoming packet fails it's error check the rpc will respond to the tx request as normal, i.e. the tx accept from the rpc will be delayed until the incoming packet has finished. if a valid packet is received this must be uploaded to the host before the rpc can respond to the host?s tx request. thus an rx request will be signalled to the host and not the expected tx accept and the host must upload the incoming packet before the tx packet can be downloaded. the tx request should be left asserted (low) during the upload. the rpc will respond as normal after the upload is completed. ? for the above reason it is often easier to use rx request to trigger a host interrupt and upload the rpc to the host under interrupt control. ? see appendix b and c. for example rpc driver subroutines. figure 7: tx download timing diagram
radiometrix ltd, rpc page 8 2.1.2 r ead a byte from the rpc the sequence for a byte transfer from the rpc to the host (i.e. rx upload) is asynchronous and proceeds as follows :- 1. rpc will assert rx request line low to initiate transfer 2. host pulls rx accept low (i.e. request is accepted by the host) 3. rpc will turn on it's bus drivers, place ls nibble onto data lines and negate rx request (set to 1) 4. host reads the data and negates rx accept (i.e. data has been accepted) repeat steps 1-4 with ms nibble . notes: ? the rpc will turn off it's data bus drivers after the entire packet has been uploaded to the host. ? see appendix b and c. for example rpc driver subroutines. 2.2 h ost <> rpc p acket f ormat 2.2.1 t he c ontrol b yte the first byte of a rpc <> host packet transfer is always the c ontrol b yte . this byte is used to control the transfer and contains information about the type of packet, number of bytes to be transferred, memory address, read/write bit etc. bit 7 of the control byte is the packet type flag, pt, it determines the class of transfer and the interpretation of the other bits in the control byte. figure 8: rx upload timing diagram
radiometrix ltd, rpc page 9 2.2.2 s ending and receiving d ata p ackets data packets are sent to / received from remote rpc?s. they begin with a control byte with bit 7 cleared and may be of variable length and contain up to 27 bytes of user determined data. the remainder of the bytes in the data packet are of the users determination. the packet would usually be made up of a number of fields consisting of some but not necessarily all of the following :- source address / id destination address / id system id packet count encryption / scrambler control additional error check codes ( the rpc performs it's own error checks) routing information ( for repeaters) link control codes (connect/disconnect/ack/nak etc.) data field 2.2.3 rpc m emory a ccess the rpc?s eeprom memory can be accessed by setting bit 7 in the control byte. bit 6 (r/w flag) defines a memory read or write. the bits left define the address. figure 9: control byte for data packet figure 10: rpc memory access
radiometrix ltd, rpc page 10 rpc memory reads: host issues just the control byte, with bit 6 (w/r) cleared, bit 7 (pt) set and the memory address. the rpc will respond with 2 bytes, the first is a control byte which is an echo of the control byte just issued by the host, this is useful if the host is using an interrupt handler. the 2nd byte is the memory contents. rpc memory writes: host issues 2 bytes, the first is the control byte with bit 6 (w/r) set, bit 7 (pt) set and the memory address. the 2nd byte is the data to be written. the rpc does not give a response to memory writes. notes memory writes to locations 01 to 3f, write to the non-volatile eeprom in the rpc. the eeprom has a limit of 100,000 write cycles therefor it's use must be restricted to infrequently changed data. the rpc only writes to the eeprom when instructed to by the host. each byte takes 10ms to write. to prevent accidental/spurious writes to eeprom the host must set the we bit in switches prior to each byte to be written. we recommend that the host performs a read/verify after each byte write to eeprom. the above does not apply to any memory reads nor to writes to switches (address 00h). figure 11: control byte for memory access
radiometrix ltd, rpc page 11 3.0 rpc? s s witches s witches is memory location 00h in ram, it contains 8 flags which are used to determine the rpc's operation. on rpc reset, power-up or watchdog time-out it is loaded from location 08h (in eeprom). the default value is 00 hex - this is all functions deselected. 3.1 ps0 & ps1 - p ower s aving the rpc has 4 levels of power saving selected by ps0 & ps1 in switches. power saving is achieved by shutting down the transceiver and the rpc for a period of time ( o ff -t ime ) when the rpc is in the idle state (i.e. nothing happening). during the o ff period current is reduced to the device leakage of <50 a typ. the rpc will still respond immediately to a host tx request but cannot receive radio signals. after the programmed o ff -t ime the rpc will wake itself up, turn the receiver on and listen for valid preamble. on time = pwr->rx (eeprom address 05h) + 1ms = 4ms (using rpc default values) if preamble is found the rpc will stay on and decode the packet, if not the rpc will shut down for another off time period. also see - wake-up (address 02h of eeprom) and paragraph 2.2.2 . figure 12: switches
radiometrix ltd, rpc page 12 ps1 ps0 0 0 continuous 20ma (no power saving) 0 1 power save programmable sleeptime * 1 0 sleep < 100 a (fixed off time of 2.9s) 1 1 off < 50 a transceiver is off ( reset or txr to wake-up) * sleeptime programmable in eeprom address 03h. value off -time average current 00 01 02 03 04 05 06 07 22ms 45ms 90ms 181ms 362ms 725ms 1.45s 2.9s 2.95 ma 1.60 ma 0.85 ma 0.46 ma 0.26 ma 0.16 ma 0.10 ma 0.08 ma the supply current's quoted above are typical for a bim + rpc using the eeprom default values. 3.2 hto & rto - i nterface t ime -o ut both the host and the radio interfaces can 'hang' the rpc while it waits for an external event. under error conditions the rpc will reset itself if the appropriate hto or rto switch is set. rto r adio t ime o ut . 0 no time out 1 time-out and reset if > 2.9s of plain preamble detected. (note. valid extended preamble used for wake-ups will not cause a time-out to be detected) hto h ost t ime o ut 0 no time out 1 time-out and reset if host fails to reply to any request or handshake within 2.9s 3.3 we - eeprom w rite e nable this bit protects the eeprom from accidental writes, it must be set to 1 prior to each byte write to the eeprom (addresses 01h to 3fh). this bit will be cleared by the rpc after each byte write. 3.4 st - s elf t est f lag writing a 1 to this switch will initiate a radio self test. both the transmitter and receiver are enabled, data is feed to the tx and checked for correct recover from the rx. if the test is good, the st bit will set, if the test fails the st bit will not set. the self test takes 20ms to complete.
radiometrix ltd, rpc page 13 3.5 lbt & dbt - c ollision a voidance listen before transmit, lbt, and delay before transmit, dbt determine what collision avoidance the rpc will take before each transmission. lbt dbt function 0 0 immediate tx, no channel check 0 1 fixed delay tx, no channel check (time slots) this is useful for rapid polling of up to 255 units by a master station. slots is set to the units id number, the packet size, preamble length and change over delay must be the same for all units being polled. see - eeprom parameters 1 0 immediate tx, if channel is clear the receiver is turned on and the channel checked for preamble or data. the rpc will only go to transmit when the channel is clear. 1 1 random delay tx, if channel is clear this mode is useful in random access networks where there is a high statistical probability that more than 2 rpcs could be attempting to transmit at the same time. the receiver is turned on and the channel is checked for preamble or data. if the channel is clear the rpc will go to transmit, if the channel is busy the rpc will delay by a random time (setable by tx-back-off in eeprom) then try again for a clear channel.
radiometrix ltd, rpc page 14 4.0 u ser c onfigurable p arameters i n eeprom the eeprom has address range 01h - 3fh (63 bytes) the first 15 bytes (8 are defined) contain parameters used to control the rpc. figure 13: rpc?s eeprom memory
radiometrix ltd, rpc page 15 p reamble number of "01" preamble cycles on tx packets one '01' cycle takes 50 s @ 40kbit/s address 01 default 64 formula preamble time = p reamble * 0.05 ms valid range 01 to ff w ake -u p number of units of 'w ake -u p p reamble + p lease h old l ine ' to be sent as extended preamble to wake-up a remote rpc in power save mode. w ake -u p should be set to approx. 1.5 times the remote units off time address 02 default ff formula wake-up message = w ake -u p * 13.1 ms valid range 01 to ff s leep -t ime power save 'off' time (rc controlled) the off time is controlled by an rc oscillator in the rpc which has a wide tolerance of +/- 30% address 03 default 05 formula off-time = 22 * 2 s leep -t ime ms valid range 00 to 07 tx ? ? ? ? rx tx ? ? ? ? rx change over delay in units of 100 s address 04 default 1e formula delay = tx ? rx * 0.1 ms valid range 01 to ff pwr rx rx stabilisation delay in units of 100 s address: 05 default: 1e formula: delay = pwr rx * 0.1 ms valid range: 01 to ff tx-b ack -o ff maximum tx back-off delay in units of 1ms used when lbt=1 & dbt=1 address 06 default 03 formula maximum delay = (2 tx-b ack -o ff - 1) ms valid range 00 to 07 00 = 0 - 1 ms 01 = 0 - 3 ms 02 = 0 - 7 ms 03 = 0 - 15 ms 04 = 0 - 31 ms 05 = 0 - 63 ms 06 = 0 - 127 ms 07 = 0 - 255 ms
radiometrix ltd, rpc page 16 tx-s lot 0 - 255 slot number for delayed (polled) tx delayed tx in packet units, used when lbt=0 & dbt=1 address 07 default 01 formula delay = tx-slot * (preamble*0.05 + tpacket + 3*tx ? rx + 0.5) ms where tpacket = number of bytes in packet * 0.30 ms valid range 00 to ff r eset s tate r eset s tate o f s witches the contents of this address are copied into s witches on rpc reset, power-up or watchdog time-out address 08 default 00 address 09 to 0f are reserved for future and should not be used by the h ost eeprom addresses 10 to 3f (48 bytes) are free for h ost use as general storage . 5.0 d iagnostic / d ebug t est modes these special test modes are useful for system testing and debugging to select these modes the rpc should be released from reset with the txr line held low, normal rpc operation will resume when the txr is set high, i.e. txr should be held while in these test modes. note : for normal operation of the rpc the txr line must be held high for either 1ms after a reset pulse or 100ms after a power up. there are 9 test modes which are selected by a binary code applied to the rpc's data bus. a 4 bit dil switch or rotary hex switch connected between the data bus and 0v will select the modes (the rpc has weak internal pull-up's). alternatively the host may select the test modes by holding txr low, resetting the rpc and driving the required test mode code onto the data bus. note: the rpc continuously monitors the mode selected i.e.. a reset is not required on mode changes. figure 14: diagnostic mode selection timing diagram
radiometrix ltd, rpc page 17 in some modes the rxr output from the rpc is driven low to indicate 'pass' or 'ok'. an led + 1k ? from rxr to 5v is recommended. mode name function 0 rx-o n p reamble d etector o n (rxr red led = preamble detected) 1 rx-p ulse 10ms on : 10ms off, p reamble d etector o n rxr led 2 tx-o n -p re preamble modulation - send continuous preamble 3 tx-o n -s q 100hz s quare w ave m od - tx testing on spec. analyser 4 tx-o n -255 random 40kbit/s data for e ye diagram tests, sync's on rxr 5 tx-p ulse 10ms on : 10ms off, p reamble bursts , rx lock in tests 6 e cho t ransponder mode , re-transmit any valid packets received 7 r adar send ascii t est p acket "radiometrix" and listen for echo 8 s elf -t est loop test, tx > rx (ok on rxr) modes 6 & 7 are particularly useful for software debugging and range testing. d3 d2 d1 d0 mode 0 0 0 0 0 0 0 0 1 1 0 0 1 0 2 0 0 1 1 3 0 1 0 0 4 0 1 0 1 5 0 1 1 0 6 0 1 1 1 7 1 0 0 0 8 figure 15: stand-alone diagnostic mode
radiometrix ltd, rpc page 18 a ppendix - a a detailed look at the rpc's transceiver interface the rpc interfaces to the transceiver using 4 lines :- tx output active low enable for the transmitter. txd output serial data to be sent. rx output active low enable for the receiver. rxd input received serial data. note 1 all lines are 5v cmos levels note 2 there is no requirement for a carrier/signal detect signal from the transceiver nor for the rxd output to be muted when no signal is present. the enable lines - tx & rx these normally high, active low lines are used to control the transceiver. the rpc is a half-duplex controller thus in normal operation the transceiver is either transmitting or receiving or off. the rpc only enables the tx and the rx at the same time during self test (local loop back). transmit data - txd txd is the serial data to the transmitter, it is held low when the transmitter is not enabled. when the tx is enabled a synchronous 40kbit/s (25.0 s/bit) serial code is present to modulate the transmitter. receive data - rxd rxd is a hi-impedance input which is fed with a 'squared-up' (5v logic level) signal from the receivers' data slicer. the rpc contains a very selective, noise immune signal detector and therefor does not require that the rxd signal be muted in the absence of signal, i.e.. squared-up channel noise may be fed to the rpc when no signal is present. the rpc's packet encoder the packet is made-up of 4 parts: preamble this is a simple 20khz square wave, the number of cycles being programmed by address 01h of the eeprom. the preamble has two functions, the initial portion it is used to allow the data slicer in a remote receiver to establish the correct slicing point (for the bim-xxx-f this takes a maximum of 3ms), after the receiver has settled, the remaining portion is used by the receiving rpc to positively identify and phase lock onto the incoming the signal (this requires 15 cycles of preamble). the preamble may extended to wake-up a remote rpc in power saving mode. frame sync a 7 bit barker sequence is used to identify the start of the data. alternatively if the transmitter is sending extended preamble (to wake a power saving remote rpc) a complimented 7 bit barker sequence is sent every 256 preamble cycles as a 'please hold the line' code. an 8th balancing bit is added after the barker sequence.
radiometrix ltd, rpc page 19 data each byte in the rpc's buffer is expanded into a 12 bit symbol prior to sending. the symbol coding has the following properties :- ? perfect 50:50 balance, i.e.. always 6 one's & 6 zero's ? there are never more than 4 consecutive one's or zero's. this minimises the low frequency components in the code and allows fast settling times to be used for the receivers' data slicer. ? minimum hamming distance = 2, i.e.. each code is different from any other code by a minimum of 2 bits, thus all odd number of bit errors will always be detected. ? in general only 256 of 4096 (6.25%) possible codes are valid, i.e.. a 93.75 % probability of trapping a byte error. ? preamble and the frame sync codes are not part of the symbol alphabet, a 'clash' signal will cause immediate termination of the current decode followed by an attempt to lock to the new signal. check sum since the receiver checks each symbol for integrity, a simple 8 bit check sum is used to test for overall packet integrity. this is also coded into a 12 bit symbol prior to transmission.
radiometrix ltd, rpc page 20 the rpc's packet decoder signal decoding is in 4 stages :- search initially the rpc's decoder searches the radio noise on the rxd line for the 20khz preamble signal. the search is performed by a 16 times over-sampling detector which computes the spectral level of 20khz in 240 samples of the rxd signal (750 s window).if the level exceeds a pre-set threshold the decoder will attempt to decode a packet. lock-in the same set of 240 samples are used to compute the phase of the incoming preamble and synchronise the internal recovery clock to an accuracy of +/- 2 s. the recovery clock samples the mid point of each incoming data bit and shifts the samples trough an 8 bit serial comparator. the comparator searches the data on a bit by bit basis for the frame sync byte. while the search is in progress, the decode will abort if the preamble fails to maintain a certain level of integrity. if the comparator finds the 'please hold the line' code used during extended wake-up preamble a phase re-lock is triggered to ensure accurate phase tracking until the actual packet arrives. when the frame sync is detected the decoder attains full synchronisation and will move to the decode state. decode data is now taken in 12 bits at a time (one symbol), decoded into the original byte and placed in the receive buffer. the symbol decoder verifies each received symbol as valid (only 256 out of a possible 4096 are valid) and will immediately abort the decode on a symbol failure. the first byte contains the byte count and is used to determine the end of message. check sum the last byte is the received check sum, this is verified against a locally generated sum of all the received bytes in the packet. if it matches the packet is valid and rxr line will be pulled low to inform the host that a packet awaits uploading. notes on error handling the rpc?s' decoder is deliberately non bit error tolerant, i.e.. no attempt is made to repair corrupt data bits. all of the redundancy in the code is directed towards error checking. for an fm radio link using short packet lengths, e.g. rpc + bim , packets are either 100% or so grossly corrupt as to be unrecoverable. by the same reasoning, the host is not informed when the rpc decoder aborts a packet decode since corrupt information is of little value. a packet acknowledge time-out and re-transmission is the preferred strategy for error handling.
radiometrix ltd, rpc page 21 a ppendix - b example rpc driver subroutines for arizona pic16c73 packet transfers to / from the rpc are best handled in the host by two subroutines :- out_byte & in_byte additionally listen_bus is called on completion of a packet transfer to the rpc to return the data bus to inputs (default state). ;--------------------------------------------------------------------; ; ; rpc drivers ; ; ;-------------------------------------------------------------------- ; ; host processor pic16c73 or similar ; rpc equ 06 ;use port b on pic ; ; ** bit assignments for rpc port ** ; d7 equ 7 ;bi-dir d6 equ 6 ;bi-dir d5 equ 5 ;bi-dir d4 equ 4 ;bi-dir txa equ 3 ;input txr equ 2 ;output rxa equ 1 ;output rxr equ 0 ;input on rb0, can be configured as an interrupt ; rpc_ddr 86 ;data direction register for port b (rpc) ; ;this register is in bank 1 of the register file ; ;-------------------------------------------------------------------- ; w equ 0 ;accumulator as destination f equ 1 ;register file as destination indf equ 00 ;indirect file register figure 16: rpc to pic - c interface
radiometrix ltd, rpc page 22 ;subroutine in_byte ; ;in_byte read a byte from the rpc into file pointed to by fsr ; w is destroyed ; ; note this routine will hang the host until the host ; completes the transfer of two nibbles ; ; this subroutine can be configures to run as part of aninterrupt handler if the :rxr line from the rpc : is used to trigger a host interrupt ; ; in_byte btfsc rpc,rxr ;we got a rx request yet? goto in-byte ;no , so loop back and wait ; ; read the ls nibble from the rpc ; bcf rpc,rxa ;accept the request (set accept low) ; awaitdata btfss rpc,rxr ;has request gone up? data is present goto awaitdata ;loop back till it does ; nop ;time delay to ensure data stable ; ;before read ; movf rpc,w ;read the ls nibble from the bus bsf rpc,rxa ;tell rpc we got nibble (accept = 1) andlw b'11110000' ;just the data ; movwf indf ;save ls nibble in target file (via ; ;fsr) swapf indf ;right justify ls nibble ; ; now get ms nibble from the rpc ; ; innibble btfsc rpc,rxr ;we got next rx request yet ? goto innibble ;no , so loop back and wait ; bcf rpc,rxa ;accept request (set accept low) ; awaitd1 btfss rpc,rxr ;has request gone up? data is present goto awaitd1 ;loop back till it does ; nop ;time delay to ensure data stable ; ;before read ; movf rpc,w ;read the ms nibble from the bus bsf rpc,rxa ;tell rpc we got nibble (accept=1) andlw b'11110000' ;just the data ; iorwf indf ;combine ms nibble with ls nibble ;already ; ;in the file (via fsr)return ; ; a byte has been read from the rpc into address pointed at by fsr ; ;-------------------------------------------------------------------- ;
radiometrix ltd, rpc page 23 ;subroutine out_byte ;out_byte write a byte from file pointed to by fsr to rpc ; w is destroyed ; ; note this routine will hang the host until the rpc ; accepts the transfer of two nibbles ; ; warning out_byte will set the data bus to drive after ; detecting a txa from the rpc. ; the calling routine must set 4 data lines ; back to i/p on completion of packet transfer ; (i.e. call listenbus) ; out_byte swapf indf,w ;get ls nibble from file (via fsr) into ; ;bits 4 to 7 of w andlw b'11110000' ;just the nibble iorlw b'00000010' ;set txr low, leave rxa high movwf rpc ;set txr low, output nibble ; waccept btfsc rpc,txa ;we got a tx accept back yet? goto waccept ;no, so loop back and wait ; ;we got acceptance so it's ok to drive bus ; bsf status,rp0 ;select page 1 movlw b'00001001' ;drive bus movwf rpc_ddr bcf status,rp0 ;select page 0 bus is now driving ; bsf rpc,txr ;remove request, data is on bus wdun btfss rpc,txa ;has data been read? goto wdun ;wait till rpc removes accept ; ;ls nibble of (fsr) is sent , now do ms nibble ; movf indf,w ;get ms nibble from file (via fsr) ; andlw b'11110000' ;just the ms nibble iorlw b'00000010' ;set txr low (bit 2), rxa stays high movwf rpc ;output nibble + txr low ; waccept1 btfsc rpc,txa ;we got a tx accept back yet? goto waccept1 ;no, so loop back and wait ; bsf rpc,txr ;remove request, data is on bus ; wdun1 btfss rpc,txa ;has data been read? goto wdun1 ;wait till rpc removes accept ; return ; ; byte is sent to rpc ;-------------------------------------------------------------------- ; subroutine - listen_bus , set data bus to input ; listen_bus bsf status,rp0 ;select page 1 movlw b'11111001' ;bus to input movwf rpc_ddr bcf status,rp0 ;select page 0 return ; bus is listening to rpc ;--------------------------------------------------------------------
radiometrix ltd, rpc page 24 a ppendix - c example rpc driver subroutines for motorola 68hc11 packet transfers to / from the rpc are best handled in the host by two subroutines :- out_byte & in_byte additionally listen_bus is called on completion of a packet transfer to the rpc to return the data bus to inputs (default state). ********************************************************************* * * cpu register equations * ********************************************************************* * *this section contains a few of the necessary register equations used *in the example subroutines. portc equ $1003 ;address of rpc port ddrc equ $1007 ;data direction register port-c * port-c7 = rx-accept output * port-c6 = rx-request input * port-c5 = tx-accept input * port-c4 = tx-request output * port-c3 = rpc data bit-3 * port-c2 = rpc data bit-2 * port-c1 = rpc data bit-1 * port-c0 = rpc data bit-0 figure 17: rpc to hc11 -c interface
radiometrix ltd, rpc page 25 ********************************************************************** * random access memory * ********************************************************************* org ram ;ram area definition save_1 rmb 1 ;temporarily save location 1 save_x rmb 2 ;holds files pointer for in_byte ********************************************************************** * subroutine: in_byte * ********************************************************************* *this subroutine is designed to be called by an interrupt handler to *read a byte from the rpc into a file pointed at by x * *note: the interrupt handler should load the x register with the file address before calling this subroutine. in_byte clr save_1 ;clear temporarily memory location ldab #%10010000 ;set correct data direction i/p stab ddrc wait_rq ldab portc ;wait for rx-request to go low bitb #%01000000 ; bne wait_rq in_lp ldab portc andb #%01111111 ;force rx-accept to go low stab portc wait_rq1 ldab portc ;wait for rx-request to go high bitb #%01000000 beq wait_rq1 dat_in ldaa portc ;read in data anda #%00001111 ldab portc ;force accept high orab #%10000000 stab portc staa save_1 ;save nibble to temp location wait_rq2 ldab portc ;wait for rx-request to go low bitb #%01000000 bne wait_rq2 in_lp2 ldab portc andb #%01111111 ;force rx-accept to go low stab portc wait_rq3 ldab portc ;wait for rx-request to go high bitb #%01000000 beq wait_rq3 dat_in2 ldaa portc ;read in data anda #%00001111 asla asla asla asla ldab portc ;force accept high orab #%10000000 stab portc oraa save_1 ;put nibbles together in temp location staa save_1 read_end staa 0,x ;save data to pointer address
radiometrix ltd, rpc page 26 ********************************************************************** * subroutine: out_byte ********************************************************************** *this subroutine will output of one byte to the rpc. register x *should contain the address of the memory location of the byte to be *send. *note: that register x has to be pre-loaded before entering this * subroutine. out_byte ldaa 0,x ;get the byte to send to rpc anda #%00001111 ;prepare least significant nibble ldab portc andb #%11101111 ;force tx-request low stab portc wait_acc ldab portc bitb #%00100000 ;wait for tx accept to go low bne wait_acc ldab #%10011111 ;change data ddrc to output stab ddrc ;turn bus drive on oraa #%10000000 ;make sure rxa is high staa portc ;output data ldab portc orab #%00010000 ;force tx-request high stab portc wait_req ldab portc ;wait for tx_accept to go high bitb #%00100000 beq wait_req ldaa 0,x ;prepare most significant nibble lsra ;by swapping the ls- & ms-nibble lsra lsra lsra ldab portc andb #%11101111 ;force tx-request low stab portc wait_txa1 ldab portc ;wait for tx-accept to go low bitb #%00100000 bne wait_txa1 oraa #%10000000 staa portc ;output data ldab portc orab #%00010000 ;force tx-request high stab portc wait_txr1 ldab portc ;wait for tx_accept to go high bitb #%00100000 beq wait_txr1 rts ********************************************************************** * subroutine: listen to bus ********************************************************************* * *this will turn the rpc host to listen mode again and should *be called when the whole packet has been sent to the rpc * listen_bus ldaa #%10010000 ;put port back to listen staa ddrc rts *********************************************************************
radiometrix ltd, rpc page 27 a ppendix - d the rpc as a control ic clock frequency all timings within the rpc (except sleep) are determined by the clock frequency. the standard frequency is 10.24mhz and all timings unless explicitly stated otherwise, assume this clock frequency. the data rate = f 256 bit / s clk ( i.e. 40kbit/s for fclk=10.24mhz) clock accuracy the rpc uses synchronous data transmission and requires an accurate reference clock. in the worst case , max. preamble and packet length, the allowable bit rate timing error between transmitter and receiver is 0.2 bits in 1000 bits, i.e. +/-200ppm total or +/-100ppm at each end. bit time f xtal = hz 256 i.e. 10.24 mhz crystal = 25.0 s per bit accuracy, temp drifts must keep x-tal +/- 100ppm of nominal figure 18: rpc-000-so & rpc-000-dil outlines
radiometrix ltd 4 hartcran house gibbs couch watford wd19 5ez england tel: 020 8428 1220 fax:020 8428 1221 int : +44 20 8428 1220 www.radiometrix.co.uk info@radiometrix.co.uk copyright notice this product data sheet is the original work and copyrighted property of radiometrix ltd. reproduction in whole or in part must give clear acknowledgement to the copyright owner. limitation of liability the information furnished by radiometrix ltd is believed to be accurate and reliable. radiometrix ltd reserves the right to make changes or improvements in the design, specification or manufacture of its subassembly products without notice. radiometrix ltd does not assume any liability arising from the application or use of any product or circuit d escribed herein, nor for any infringements of patents or other rights of third parties which may result from the use of its products. this data sheet neither states nor implies warranty of any kind, including fitness for any particular application. these radio devices may be subject to radio interference and may not function as intended if interference is present. we do not recommend their use for life critical applications. radio and emc regulations the intrastat commodity code for all our modules is: 8542 4090. the purchaser of radiometrix subassemblies must satisfy all relevant emc and other regulations applicable to their finished products. r&tte directive after 7 april 2001 the manufactu rer can only place finished product on the market under the provisions of the r&tte directive. equipment within the scope of the r&tte directive may demonstrate compliance to the essential requirements specified in article 3 of the directive, as appropriate to the particular equipment. further details are available on radiocommunications agency (ra) web site: http://www.radio.gov.uk/topics/conformity/conform-index.htm the library and information service the radiocommunications agency wyndham house, 189 marsh wall london e14 9sx united kingdom tel: +44 (0)20 7211 0502 or 0505 fax: +44 (0)20 7211 0507 e-mail: library@ra.gtnet.gov.uk


▲Up To Search▲   

 
Price & Availability of RPC-UHF

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X